package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Monitoring generated by hbm2java
 */
@Entity
@Table(name="monitoring"
    ,catalog="madr_bd10"
)
public class Monitoring  implements java.io.Serializable {


     private Integer idMon;
     private ProductionEvents productionEvents;
     private MonitoringTypes monitoringTypes;
     private Date dateMon;
     private Boolean monitorPestsMon;
     private Boolean monitorDiseasesMon;
     private Boolean monitorWeedsMon;
     private Set physiologicalMonitorings = new HashSet(0);
     private Set monitoringPads = new HashSet(0);

    public Monitoring() {
    }

	
    public Monitoring(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    public Monitoring(ProductionEvents productionEvents, MonitoringTypes monitoringTypes, Date dateMon, Boolean monitorPestsMon, Boolean monitorDiseasesMon, Boolean monitorWeedsMon, Set physiologicalMonitorings, Set monitoringPads) {
       this.productionEvents = productionEvents;
       this.monitoringTypes = monitoringTypes;
       this.dateMon = dateMon;
       this.monitorPestsMon = monitorPestsMon;
       this.monitorDiseasesMon = monitorDiseasesMon;
       this.monitorWeedsMon = monitorWeedsMon;
       this.physiologicalMonitorings = physiologicalMonitorings;
       this.monitoringPads = monitoringPads;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_mon", unique=true, nullable=false)
    public Integer getIdMon() {
        return this.idMon;
    }
    
    public void setIdMon(Integer idMon) {
        this.idMon = idMon;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_mon", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="type_mon")
    public MonitoringTypes getMonitoringTypes() {
        return this.monitoringTypes;
    }
    
    public void setMonitoringTypes(MonitoringTypes monitoringTypes) {
        this.monitoringTypes = monitoringTypes;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_mon", length=19)
    public Date getDateMon() {
        return this.dateMon;
    }
    
    public void setDateMon(Date dateMon) {
        this.dateMon = dateMon;
    }
    
    @Column(name="monitor_pests_mon")
    public Boolean getMonitorPestsMon() {
        return this.monitorPestsMon;
    }
    
    public void setMonitorPestsMon(Boolean monitorPestsMon) {
        this.monitorPestsMon = monitorPestsMon;
    }
    
    @Column(name="monitor_diseases_mon")
    public Boolean getMonitorDiseasesMon() {
        return this.monitorDiseasesMon;
    }
    
    public void setMonitorDiseasesMon(Boolean monitorDiseasesMon) {
        this.monitorDiseasesMon = monitorDiseasesMon;
    }
    
    @Column(name="monitor_weeds_mon")
    public Boolean getMonitorWeedsMon() {
        return this.monitorWeedsMon;
    }
    
    public void setMonitorWeedsMon(Boolean monitorWeedsMon) {
        this.monitorWeedsMon = monitorWeedsMon;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="monitoring")
    public Set getPhysiologicalMonitorings() {
        return this.physiologicalMonitorings;
    }
    
    public void setPhysiologicalMonitorings(Set physiologicalMonitorings) {
        this.physiologicalMonitorings = physiologicalMonitorings;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="monitoring")
    public Set getMonitoringPads() {
        return this.monitoringPads;
    }
    
    public void setMonitoringPads(Set monitoringPads) {
        this.monitoringPads = monitoringPads;
    }




}


